MySQL Workbench报错问题解决


MySQL Workbench 8.0 点击Server Status面板Could not acquire management access for administration报错问题解决

  ‍

  ‍

  win10安装MySQL Workbench 8.0后连接MySQL服务器后,点击Server Status状态面板报错,
错误如下:

1
2
Could not acquire management access for administration
TRuntimeError: Target host is configured as Windows, but seems to be a different OS. Please review the connection settings.

  error.png

  解决方法:
是因为windows中文桌面默认编码问题,
修改安装目录C:\Program Files\MySQL\MySQL Workbench 8.0 CE\workbench下的os_utils.py文件约356行,
默认是:

1
process = subprocess.Popen(command, stdin = subprocess.PIPE, encoding="utf-8", stdout = subprocess.PIPE, stderr = subprocess.STDOUT, shell=True)

  修改为如下:

1
process = subprocess.Popen(command, stdin = subprocess.PIPE, encoding="gbk", stdout = subprocess.PIPE, stderr = subprocess.STDOUT, shell=True)

  即把utf-8修改为gbk保存即可,重新打开 MySQL Workbench即可查看Server Status。

-------------本文结束感谢您的阅读-------------